<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue3.0/3.js"></script>
</head>
<body>
    <div id="component-demo">
        <button-counter></button-counter>
        <button-counter></button-counter>
        <button-counter></button-counter>
    </div>

    <script>
            const app = Vue.createApp({})

            app.component('button-counter',{
                data(){
                    return {
                        count:0
                    }
                },
                template:`
                <button @click="count++">
                    你点击我{{ count }} 次了.
                </button>`
            })

            app.mount('#component-demo')
    </script>
</body>
</html>